﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Northwind.NET.EDM.FE.WinForms.Controls;

namespace Northwind.NET.XBAP.FE
{
    /// <summary>
    /// Interaction logic for Page1.xaml
    /// </summary>
    public partial class Page1 : Page
    {
        public Page1()
        {
            InitializeComponent();
        }

        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            windowsFormsHost1.Child = new ApplicationControlsManagerUserControl();

            ApplicationControlsManagerUserControl c = (ApplicationControlsManagerUserControl)windowsFormsHost1.Child;
            if (c != null) c.BackColor = System.Drawing.SystemColors.Control;
 
        }

        private void Page_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            Window window = (Window)sender;
            mainGrid.Height = window.Height;
            mainGrid.Width = window.Width;

            windowsFormsHost1.Height = e.NewSize.Height - 30;
            windowsFormsHost1.Width = e.NewSize.Width;
 
        }

    }
}
